package gui.logado.mensagens;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;
import recados.Recados;

public class Salvas extends List implements CommandListener {

    private final Command cmdVoltar;

    public Salvas() {
        super("Mensagens Salvas", List.IMPLICIT);

        cmdVoltar = new Command("Voltar", Command.BACK, 0);
        addCommand(cmdVoltar);
        setCommandListener(this);
    }

    public void commandAction(Command c, Displayable d) {
        if (c == cmdVoltar) {
            Recados.getInstance().setCurrent(Recados.getInstance().getMensagens());
        }
    }
}
